package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.CityDao;
import com.home.qh.model.City;
import com.home.qh.service.CityManager;

@Service("cityManager")
public class CityManagerImpl extends GenericManagerImpl<City, Long> implements	CityManager {
	CityDao cityDao;

    @Autowired
    public CityManagerImpl(CityDao cityDao) {
        super(cityDao);
        this.cityDao = cityDao;
    }

	public List<City> getCityByCodeAndName(String cityCode,
			String cityName) {
		return cityDao.getCityByCodeAndName(cityCode, cityName);
	}

	public List<City> getCityByCity(City city, String sort, boolean desc, int startResult, int maxResults) {
		return cityDao.getCityByCity(city, sort, desc, startResult, maxResults);
	}
}
